//
//  WaterFlowCell.m
//  练习
//
//  Created by hcios on 2017/7/7.
//  Copyright © 2017年 hcios. All rights reserved.
//

#import "WaterFlowCell.h"
#import "UIImageView+WebCache.h"

@implementation WaterFlowCell

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.imgView = [[UIImageView alloc] initWithFrame:self.contentView.bounds];
        UITapGestureRecognizer *ges = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(ges:)];
        self.contentView.userInteractionEnabled = YES;
        self.imgView.userInteractionEnabled = YES;
        [self.imgView addGestureRecognizer:ges];
        [self.contentView addSubview:_imgView];
    }
    return self;
}

-(void)ges:(UITapGestureRecognizer *)tap{
    if (self.delegate && [self.delegate respondsToSelector:@selector(click:)]) {
        [self.delegate click:tap];
    }
}


-(void)layoutSubviews{
    [super layoutSubviews];
    
    self.imgView.frame = self.contentView.bounds;
}

@end
